import request from '@/utils/request'

// 新闻分类
export function getNewsCategoryAPI() {
  return request.post('/api/app/NewsCategory')
}

// 新闻列表
export function getNewsListAPI(params: any) {
  if (!params) {
    throw new Error('Params cannot be null or undefined')
  }
  return request.post('/api/app/News', params)
}

// 新闻详情
export function getNewsDetailAPI(params: any) {
  if (!params) {
    throw new Error('Params cannot be null or undefined')
  }
  return request.post('/api/app/News', params)
}
